package com.bb.blog.code;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Optional;

@RestController
@RequestMapping("/hello")
public class HelloContoller extends Controller {
    @GetMapping("/")
    String hello() {
        return "hello world";
    }


    String requestMappingDetectTest() {
        return "";
    }
}

class Controller {
    @GetMapping("/hahah")
    public String father() {
        System.out.println("测试父类能不能找到");
        return "OK";

    }


    public static void main(String[] args) {
        int i = Thread.interrupted() ? (sout()?3:5) : 2;
        System.out.println(i);
    }

    public static boolean sout() {
        System.out.println("xixixi");
        return true;
    }
}